﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WmsService.Cache;

namespace WmsService
{
    public partial class index : System.Web.UI.Page
    {
        private const string Text = @"仓储管理系统V1.0测试页面";
        protected void Page_Load(object sender, EventArgs e)
        {
            DateTime date7 = DateTime.Now.AddDays(-7);
            if (!IsPostBack)
            {
                var ctx = Factory.ContextFactory.Create();
                var query = from o in ctx.UserToken
                            where o.CREATETIME.CompareTo(date7) >0
                            select o;
                Response.Write(Text);
                Response.Write("\n\r");
                Response.Write(String.Format("7天内共有{0}人次登录本系统！",query.Count()));
                Response.End();
            }
        }
    }
}